﻿using Microsoft.AspNet.OData;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;

namespace NETCORE.OdataRestful
{
    [Route("api/[controller]")]
    [ApiController]
    public class DtooController : ODataController
    {

        [EnableQuery]
        public IActionResult Get()
        {
            var dtoo = new Dtoo()
            {
                id = 3,
                name = "333name",
                nll = new List<string>() { "aaa", "bbb", "ccc" },
                clat = new ClasT() { add = "1121", remove = "222", update = "323" },
                clatList = new List<ClasT>()
                        {
                             new ClasT(){  add="a;kd",remove="  dkd", update="ccc"},
                             new ClasT(){  add="kdl",remove="lsal", update="kdle33"},
                             new ClasT(){  add="7585",remove="kswl", update="fddf-df-sfsd-d",
                              ctro=new Ctro {
                               age=13, dsr=new DynamicSegmentResault (), dtime=DateTime.Now, money=30939, remark="sdflsdjflsdkfjsdlewnlwermwelrmew"}
                             }
                        }
            };
            //return Ok(dtoo);
            return Ok(new List<Dtoo>() { dtoo });
        }
    }


}
